import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)
import anaf from './modules/anaf.js'
import user from './modules/user.js'

const store = new Vuex.Store({
	modules: {
		anaf,
		user
	}
})
export const msg = (title, duration=2000, mask=false, icon='none')=>{
	//统一提示方便全局修改
	if(Boolean(title) === false){
		return;
	}
	uni.showToast({
		title,
		duration,
		mask,
		icon,
		
		complete: function() {
			setTimeout(function() {
				uni.hideToast();
			}, 1500);
		}
	});
};

export default store
